package com.study.scala

/**
  * Set: 元素不可重复
  */
object SetDemo {

  def main(args: Array[String]): Unit = {
    //定长Set
    println("============= 定长Set ===========")
    val set = Set(1, 2, 3, 3, 4, 5)
    println(set)

    // 变长Set
    println("============= 变长Set ===========")
    val mutSet = scala.collection.mutable.Set[Int]()
    mutSet += 1
    mutSet += (1, 2, 3)
    println(mutSet)

  }
}
